﻿namespace YooAssetsSystem.Fsm
{
    public abstract class BaseStateNone
    {
    }

    public abstract class StateNode : StateNode<StateData>
    {
    }

    public abstract class StateNode<T> : BaseStateNone where T : StateData
    {
        protected StateMachine<T> machine;
        protected T shareData => machine?.ShareData;

        public virtual void OnCreate(StateMachine<T> machine)
        {
            this.machine = machine;
        }

        public virtual void OnEnter()
        {
        }

        public virtual void OnUpdate()
        {
        }

        public virtual void OnExit()
        {
        }
    }
}